#include <stdio.h>

int main() {
	printf("Input the number with 4 number position.\n");
	int num;scanf("%d",&num);
	do {
		printf("%d\n",num%10);
	} while(num=num/10);
	return 0;
}